package com.ruoyi.purchase.service.impl;

import java.util.List;

import com.ruoyi.purchase.mapper.PurchaseOrderMaterialMapper;
import com.ruoyi.purchase.pojo.PurchaseOrderMaterial;
import com.ruoyi.purchase.service.PurchaseOrderMaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 采购订单物料清单Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-25
 */
@Service
public class PurchaseOrderMaterialServiceImpl implements PurchaseOrderMaterialService
{
    @Autowired
    private PurchaseOrderMaterialMapper purchaseOrderMaterialMapper;

    /**
     * 查询采购订单物料清单
     *
     * @param id 采购订单物料清单主键
     * @return 采购订单物料清单
     */
    @Override
    public PurchaseOrderMaterial selectPurchaseOrderMaterialById(Integer id)
    {
        return purchaseOrderMaterialMapper.selectPurchaseOrderMaterialById(id);
    }

    /**
     * 查询采购订单物料清单列表
     *
     * @param purchaseOrderMaterial 采购订单物料清单
     * @return 采购订单物料清单
     */
    @Override
    public List<PurchaseOrderMaterial> selectPurchaseOrderMaterialList(PurchaseOrderMaterial purchaseOrderMaterial)
    {
        return purchaseOrderMaterialMapper.selectPurchaseOrderMaterialList(purchaseOrderMaterial);
    }

    /**
     * 新增采购订单物料清单
     *
     * @param purchaseOrderMaterial 采购订单物料清单
     * @return 结果
     */
    @Override
    public int insertPurchaseOrderMaterial(PurchaseOrderMaterial purchaseOrderMaterial)
    {
        return purchaseOrderMaterialMapper.insertPurchaseOrderMaterial(purchaseOrderMaterial);
    }

    /**
     * 修改采购订单物料清单
     *
     * @param purchaseOrderMaterial 采购订单物料清单
     * @return 结果
     */
    @Override
    public int updatePurchaseOrderMaterial(PurchaseOrderMaterial purchaseOrderMaterial)
    {
        return purchaseOrderMaterialMapper.updatePurchaseOrderMaterial(purchaseOrderMaterial);
    }
    /**
     * 批量删除采购订单物料清单
     *
     * @param ids 需要删除的采购订单物料清单主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderMaterialByIds(Integer[] ids)
    {
        return purchaseOrderMaterialMapper.deletePurchaseOrderMaterialByIds(ids);
    }

    /**
     * 删除采购订单物料清单信息
     *
     * @param id 采购订单物料清单主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderMaterialById(Integer id)
    {
        return purchaseOrderMaterialMapper.deletePurchaseOrderMaterialById(id);
    }
}
